import ZCookie from "../vendor/zhangsan/src/utils/Cookie/ZCookie.js" //Cookie函数库
/**
 * 接口配置
 */
let ConfigApi = class ConfigApi{
    static requestUrlWrite = "api.xinzhuocms.local.kanglongyouhui.com/admin" //请求地址 - 写
    static requestUrlRead = "api.xinzhuocms.local.kanglongyouhui.com/web" //请求地址 - 读
    static requestHttpsWrite = false //https请求 - 写
    static requestHttpsRead = false //https请求 - 读

    static websocketHost = "127.0.0.1" //websocket主机
    static websocketPort = 7788 //websocket端口

    /**
     * 请求头-写
     */
    static requestHeadersWrite(){
        var guid = ["x-m-guid", ZCookie.get("x-m-guid", 0)]
        var token = ["x-m-token", ZCookie.get("x-m-token", "")]
        var timestamp = ["x-m-timestamp", ZCookie.get("x-m-timestamp", 0)]
        return [guid, token, timestamp]
    }
    /**
     * 请求头-读
     */
    static requestHeadersRead(){
        var guid = ["x-u-guid", ZCookie.get("x-u-guid", 0)]
        var token = ["x-u-token", ZCookie.get("x-u-token", "")]
        var timestamp = ["x-u-timestamp", ZCookie.get("x-u-timestamp", 0)]
        return [guid, token, timestamp]
    }
    /**
     * 数据签名 - 写
     */
    static requestSignatureWrite(params){
        return ["x-m-signature", "xxx"]
    }

}

export default ConfigApi